package com.crm.service.impl;

import com.crm.base.BaseServiceImpl;
import com.crm.mapper.CustomerOrderMapper;
import com.crm.domain.entity.CustomerOrder;
import com.crm.service.CustomerOrderService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 客户订单业务层实现类
 */

@Service
public class CustomerOrderServiceImpl extends BaseServiceImpl<CustomerOrderMapper, CustomerOrder> implements CustomerOrderService {


    @Override
    public String proc1() {
        Map<String, Object> mp = new HashMap<>();
        mp.put("dd", null);
        baseMapper.proc1(mp);
        return mp.get("dd").toString();
    }

    @Override
    public Boolean add(CustomerOrder customerOrder) {
        // 设置订单编号
        customerOrder.setOrderNo(this.proc1());
        return super.add(customerOrder);
    }
}
